<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1" xml:lang="en">
  <title id="ih135496">Server Configuration Parameters</title>
  <body>
    <p>There are many Greenplum server configuration parameters that affect the behavior of the
      Greenplum Database system. Many of these configuration parameters have the same names,
      settings, and behaviors as in a regular PostgreSQL database system. </p>
    <ul id="ul_nss_zzh_3p">
      <li><xref href="#topic_vsn_22l_z4" format="dita"/> describes the parameter data types and
        values.</li>
      <li><xref href="#topic_cyz_p2l_z4" format="dita"/> describes limitations on who can change
        them and where or when they can be set.</li>
      <li><xref href="guc_category-list.xml#guc-cat-list">Parameter Categories</xref> organizes
        parameters by functionality.</li>
      <li><xref href="guc-list.xml#topic3">Configuration Parameters</xref> lists the parameter
        descriptions in alphabetic order.</li>
    </ul>
  </body>
  <topic id="topic_vsn_22l_z4">
    <title>Parameter Types and Values</title>
    <body>
      <p>All parameter names are case-insensitive. Every parameter takes a value of one of the
        following types: <codeph>Boolean</codeph>, <codeph>integer</codeph>, <codeph>floating point</codeph>,
        <codeph>enum</codeph>, or <codeph>string</codeph>.</p>
      <p>Boolean values may be specified as <codeph>ON</codeph>,
          <codeph>OFF</codeph>, <codeph>TRUE</codeph>, <codeph>FALSE</codeph>, <codeph>YES</codeph>,
          <codeph>NO</codeph>, <codeph>1</codeph>, <codeph>0</codeph> (all case-insensitive).</p>
      <p>Enum-type parameters are specified in the same manner as string parameters, but are
        restricted to a limited set of values. Enum parameter values are case-insensitive.</p> 
      <p>Some settings specify a memory size or time value. Each of these has an implicit unit,
        which is either kilobytes, blocks (typically eight kilobytes), milliseconds, seconds, or
        minutes. Valid memory size units are <codeph>kB</codeph> (kilobytes), <codeph>MB</codeph>
        (megabytes), and <codeph>GB</codeph> (gigabytes). Valid time units are <codeph>ms</codeph>
        (milliseconds), <codeph>s</codeph> (seconds), <codeph>min</codeph> (minutes),
          <codeph>h</codeph> (hours), and <codeph>d</codeph> (days). Note that the multiplier for
        memory units is 1024, not 1000. A valid time expression contains a number and a unit. When
        specifying a memory or time unit using the <codeph>SET</codeph> command, enclose the value
        in quotes. For example:</p>
      <codeblock>SET statement_mem TO '200MB';</codeblock>
      <note type="note">There is no space between the value and the unit names.</note>
    </body>
  </topic>
  <topic id="topic_cyz_p2l_z4">
    <title>Setting Parameters</title>
    <body>
      <p>Many of the configuration parameters have limitations on who can change them and where or
        when they can be set. For example, to change certain parameters, you must be a Greenplum
        Database superuser. Other parameters require a restart of the system for the changes to take
        effect. A parameter that is classified as <i>session</i> can be set at the system level (in
        the <codeph>postgresql.conf</codeph> file), at the database-level (using <codeph>ALTER
          DATABASE</codeph>), at the role-level (using <codeph>ALTER ROLE</codeph>), at the
           database- and role-level (<codeph>ALTER ROLE...IN DATABASE...SET</codeph>, or at the
        session-level (using <codeph>SET</codeph>). System parameters can only be set in the
          <codeph>postgresql.conf</codeph> file.</p>
      <p>In Greenplum Database, the master and each segment instance has its own
          <codeph>postgresql.conf</codeph> file (located in their respective data directories). Some
        parameters are considered <i>local</i> parameters, meaning that each segment instance looks
        to its own <codeph>postgresql.conf</codeph> file to get the value of that parameter. You
        must set local parameters on every instance in the system (master and segments). Others
        parameters are considered <i>master</i> parameters. Master parameters need only be set at
        the master instance.</p>
      <p>This table describes the values in the Settable Classifications column of the table in the
        description of a server configuration parameter.</p>
      <table id="ih389119">
        <title>Settable Classifications</title>
        <tgroup cols="2">
          <colspec colnum="1" colname="col1" colwidth="110pt"/>
          <colspec colnum="2" colname="col2" colwidth="367pt"/>
          <thead>
            <row>
              <entry colname="col1">Set Classification</entry>
              <entry colname="col2">Description</entry>
            </row>
          </thead>
          <tbody>
            <row>
              <entry colname="col1">master or local</entry>
              <entry colname="col2">A <i>master</i> parameter only needs to be set in the
                  <codeph>postgresql.conf</codeph> file of the Greenplum master instance. The value
                for this parameter is then either passed to (or ignored by) the segments at run
                  time.<p>A local parameter must be set in the <codeph>postgresql.conf</codeph> file
                  of the master AND each segment instance. Each segment instance looks to its own
                  configuration to get the value for the parameter. Local parameters always requires
                  a system restart for changes to take effect.</p></entry>
            </row>
            <row>
              <entry colname="col1">session or system</entry>
              <entry colname="col2"><i>Session</i> parameters can be changed on the fly within a
                database session, and can have a hierarchy of settings: at the system level
                  (<codeph>postgresql.conf</codeph>), at the database level (<codeph>ALTER
                  DATABASE...SET</codeph>), at the role level (<codeph>ALTER ROLE...SET</codeph>),
                at the database and role level (<codeph>ALTER ROLE...IN DATABASE...SET</codeph>),
                or at the session level (<codeph>SET</codeph>). If the parameter is set at multiple
                levels, then the most granular setting takes precedence (for example, session
                overrides database and role, database and role overrides role, role overrides database, and database overrides system).<p>A
                    <i>system</i> parameter can only be changed via the <codeph>postgresql.conf
                  </codeph>file(s).</p></entry>
            </row>
            <row>
              <entry colname="col1">restart or reload</entry>
              <entry colname="col2">When changing parameter values in the postgresql.conf file(s),
                some require a <i>restart</i> of Greenplum Database for the change to take effect.
                Other parameter values can be refreshed by just reloading the server configuration
                file (using <codeph>gpstop -u</codeph>), and do not require stopping the
                system.</entry>
            </row>
            <row>
              <entry colname="col1">superuser</entry>
              <entry colname="col2">These session parameters can only be set by a database
                superuser. Regular database users cannot set this parameter.</entry>
            </row>
            <row>
              <entry colname="col1">read only</entry>
              <entry colname="col2">These parameters are not settable by database users or
                superusers. The current value of the parameter can be shown but not altered.</entry>
            </row>
          </tbody>
        </tgroup>
      </table>
    </body>
  </topic>
</topic>
